﻿// (c) Copyright 2013 Mike Riedel.
// This source is subject to the Microsoft Public License (Ms-PL).
// All other rights reserved.

using System;

namespace FreshMeat.Storage
{
   /// <summary>
   /// Used by <see cref="Repository{TId,TItem,TData}"/> to indicate a requested item was not found.
   /// </summary>
   public class NotFoundException : Exception
   {
      /// <summary>
      /// Creates default instance.
      /// </summary>
      public NotFoundException()
         : this("Item not found.")
      {
      }

      /// <summary>
      /// Creates instance with a custom message.
      /// </summary>
      /// <param name="message"></param>
      public NotFoundException(string message)
         : base(message)
      {
      }

      /// <summary>
      /// Creates instance with a custom message and an inner exception.
      /// </summary>
      /// <param name="message"></param>
      /// <param name="inner"></param>
      public NotFoundException(string message, Exception inner)
         : base(message, inner)
      {
      }

      /// <summary>
      /// ID of the item that wasn't found.
      /// </summary>
      public object Id { get; set; }
   }
}
